import React from 'react'
import { Button } from 'antd-mobile'
import http from './api/http'

const App = () => {

  const fk=async()=>{
    console.log("确定付款");
    const id=6
    const title="手机"
    const price= 500
    const res=await http.get("/api/pay",{params:{id,title,price}})
    const {data,code,message}=res.data
    if(code === 200){
      window.location.href = res.data.data
    }
  }
  return (
    <div>
      <Button color='primary' fill='solid' onClick={()=>fk()}>
        确定付款
      </Button>
    </div>
  )
}

export default App
